<template>
  <el-menu :default-openeds="['1', '3']" style="min-height: 100%;overflow-x: hidden"
           background-color="rgb(48,65,86)"
           text-color="#fff"
           active-text-color="#409EFF"
           class="el-menu-vertical-demo"
           @open="handleOpen"
           @close="handleClose"
           :collapse-transition="false"
           :collapse="isCollapse"
           router
  >
    <div style="height: 60px;line-height: 60px;text-align: center">
      <img src="../assets/logo1.png" alt="" style="width: 20px;position:relative; top:5px;margin-right: 10px"></img>
      <b style="color: #409EFF" v-show="logoTextShow">健康守护者后台管理系统</b>
    </div>
    <!--<el-submenu>
        <template slot="title">
            <i class="el-icon-house"></i>
            <span slot="title">主页</span>
        </template>-->
    <el-submenu index="/" @open="handleOpen" @close="handleClose" :collapse="isCollapse">

      <template slot="title">
        <i class="el-icon-house" style="margin-right: 5px;"></i>
        <span slot="title">主页</span>
      </template>
      <el-menu-item index="/home">
        <i class="el-icon-s-data" style="margin-right: 10px;"></i>
        <span slot="title">数据展示</span>
      </el-menu-item>
      <el-menu-item index="/graph">
        <i class="el-icon-magic-stick" style="margin-right: 10px;"></i>
        <span slot="title">知识图谱</span>
      </el-menu-item>
    </el-submenu>
    <!--</el-submenu>-->
    <el-submenu index="2">
      <template slot="title">
        <i class="el-icon-menu" style="margin-right: 10px;"></i>
        <span slot="title">系统管理</span>
      </template>

      <el-menu-item index="/user">
        <i class="el-icon-s-custom" style="margin-right: 10px;"></i>
        <span slot="title">用户管理</span>
      </el-menu-item>
      <el-menu-item index="/Article">
        <i class="el-icon-collection" style="margin-right: 10px;"></i>
        <span slot="title">文章管理</span>
      </el-menu-item>
      <el-menu-item index="/post">
        <i class="el-icon-collection" style="margin-right: 10px;"></i>
        <span slot="title">帖子管理</span>
      </el-menu-item>
      <el-menu-item index="/Comment">
        <i class="el-icon-chat-line-square" style="margin-right: 10px;"></i>
        <span slot="title">评论管理</span>
      </el-menu-item>
      <el-menu-item index="/medicine">
        <i class="el-icon-suitcase-1" style="margin-right: 10px;"></i>
        <span slot="title">药品信息管理</span>
      </el-menu-item>
      <el-menu-item index="/order">
        <i class="el-icon-s-order" style="margin-right: 10px;"></i>
        <span slot="title">订单管理</span>
      </el-menu-item>
    </el-submenu>

  </el-menu>
</template>

<script>
export default {
  name: "Aside",
  data() {
    return {
      isCollapse: true
    };
  },
  props: {
    isCollapse: Boolean,
    logoTextShow: Boolean,
  },
  methods: {
    handleOpen(key, keyPath) {
      console.log(key, keyPath);
    },
    handleClose(key, keyPath) {
      console.log(key, keyPath);
    }
  }

}
</script>

<style scoped>

</style>
